package com.atguigu.meiju;

public class TestWeekMethod {
    public static void main(String[] args) {
        Week[] values = Week.values();
        for (Week w : values) {
            System.out.println(w);
        }

        Week monday = Week.valueOf("MONDAY");
        System.out.println("monday = " + monday);

        Week friday = Week.FRIDAY;
        String name = friday.name();
        System.out.println("name = " + name);

        int ordinal = friday.ordinal();
        System.out.println("ordinal = " + ordinal);
    }
}
